<template>
  <div class="home">
    <h2>主页</h2>
    <el-button type="info" @click="logout">退出</el-button>
  </div>
</template>

<script>
export default {
  name: 'Home',
  data() {
    return {}
  },
  methods: {
    logout() {
      console.log('退出了')
      window.sessionStorage.clear()
      this.$push('/login')
    }
  }
}
</script>
